<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .card {
            width: 400px;
            height: 400px;
            outline: 1px solid red;
            position: relative;
            overflow: hidden;
        }
        .card .mask {
            width: 100%;
            height: 100%;
            background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 1));
            /* background-color: rgba(0, 0, 0, 0); */
            z-index: 99;
            opacity: 0;
            transition: opacity 2s ease;
        }
        .card>* {
            position: absolute;
        }
        .card img {
            /* 解决图片下方留白问题 */
            display: block;
            width: 100%;
            height: auto;
            transition: transform 1s ease;
        }
        .card .intro {
            bottom: -20px;
            z-index: 100;
            color: white;
            transition: bottom 1s ease;
        }

        .card:hover .mask {
            opacity: 1;
        }
        .card:hover img {
            transform: scale(1.2);
        }
        .card:hover .intro {
            bottom: 0;
        }
        .more span {
            display: inline-block;
            transition: transform 500ms ease;
        }
        .more:hover span {
            transform: translateX(10px);
        }
        /* 单一职责原则 */
    </style>
</head>
<body>
    <div class="card">
        <div class="mask"></div>
        <div class="intro">
            <div>asdsadsa</div>
            <div>sadsadasdsadas</div>
            <div>asdsasdasdsa</div>
            <div class="more">
                了解更多
                <span>></span>
            </div>
        </div>
        <img src="https://www-file.huawei.com/-/media/corp2020/home/cbg/0913/matestation-p.jpg" alt="">
    </div>
</body>
</html>
